package com.hospital.insurancedip.handler;

/**
 * @Author: Yeman
 * @Date: 2023-04-03-14:48
 * @Description:
 */
public class InvocationFactory {
    /**
     * 根据表类型取得实现处理类
     *
     * @param source H监听的数据，N普通申请的数据，因监听的数据根据类型要去查推送地址，因此有个null的返回
     * @param type
     * @return
     */
    public static MessageInfo getTableImp(String source, String type) {
        switch (type) {
            case "2301":
                return new InpDetailUp();
            case "2304":
                return new InpSettleUp();
            case "2304_B":
                return new InpSettleUp();
            case "4101":
                return new InpSettleInventoryUp();
            case "410100":
                return new InpSettleInventoryUp();
            case "990206":
                return new Dip990206Up();
            case "340101":
                return new Dip340101Up();
            case "990203":
                return new Dip990203Up();
            case "990204":
                return new Dip990203Up();
            case "990205":
                return new Dip990203Up();
            case "2305":
                return new Dip2305Up();
            case "2305_B":
                return new Dip2305Up();
            default:
                if (!source.equals("H")) {
                    return null;
                } else {
                    return new Dip990203Up();
                }
        }
    }

    /**
     * 同步嵌入式医保数据到ESB无需处理
     *
     * @return
     */
    public static MessageInfo getTableImp() {
        return new Dip990203Up();
    }

}
